import App from '../App'
import Edit from '../pages/Edit'
import List from '../pages/List'
import Login from '../pages/Login'
import Personal from '../pages/Personal'
import Register from '../pages/Register'
import {BrowserRouter as Router,Route,Routes  } from 'react-router-dom'
//重命名BrowserRouter以便上线换HashRouter

const BaseRouter = () =>(
  //注意: 圆括号
  <Router>
      <Routes>
        <Route path='/' element={<App/>}>
          <Route path='/list' element={<List/>}></Route>
          <Route path='/edit' element={<Edit/>}></Route>
          <Route path='/edit/:id' element={<Edit/>}></Route>
          <Route path='/personal' element={<Personal/>}></Route>
        </Route>
        <Route path='/login' element={<Login/>}></Route>
        <Route path='/register' element={<Register/>}></Route>
      </Routes>
  </Router>
)
  
export default BaseRouter